package com.kehutong.house.enums;

import org.coraframework.util.HashID;

public enum RentStasus implements HashID {

    RENT ("0", "已出租"),
    UNDRENT("1", "未出租"),
    ;


    private final String id;
    private final String desc ;

    private RentStasus(String id, String desc) {
        this.id = id;
        this.desc = desc ;
    }

    public static RentStasus get(String desc) {
        RentStasus[] rentStasuses = values();
        for (RentStasus rentStasus : rentStasuses) {
            if (rentStasus.getDesc().equals(desc)) {
                return rentStasus;
            }
        }
        return null;
    }

    @Override
    public String getId() {
        return id;
    }

    @Override
    public String getDesc() {
        return desc;
    }
}
